package com.taxshare.seller.controller;

import com.taxshare.response.beans.Response;
import com.taxshare.seller.service.CountGatherService;
import com.taxshare.seller.view.dto.MonthGatherDTO;
import com.taxshare.seller.view.vo.MonthGatherVO;
import com.taxshare.seller.view.vo.OpenInvoiceGatherVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: CountGatherController
 * @Description:
 * @author: Hai
 * @date: 2021/6/25 10:52
 */
@RestController
@RequestMapping("/countGather")
@Api(tags = "统计汇总管理")
public class CountGatherController {

    @Autowired
    private CountGatherService countGatherService;

    @PostMapping("/getMonthGather")
    @ApiOperation(value = "月度汇总统计", notes = "统计汇总管理")
    public Response<MonthGatherVO> getMonthGather(@RequestBody MonthGatherDTO query) {
        return countGatherService.getMonthGather(query);
    }

    @PostMapping("/getOpenInvoiceGather")
    @ApiOperation(value = "已开发票统计", notes = "统计汇总管理")
    public Response<OpenInvoiceGatherVO> getOpenInvoiceGather(@RequestBody MonthGatherDTO query) {
        return countGatherService.getOpenInvoiceGather(query);
    }

}
